Skip to content

fix(lints): Improve ill_formed_attribute_input with better help message#154722

Open
JayanAXHF wants to merge 1 commit intorust-lang:mainfrom
JayanAXHF:fix/update-ignore-error-message
Open

fix(lints): Improve ill_formed_attribute_input with better help message#154722
JayanAXHF wants to merge 1 commit intorust-lang:mainfrom
JayanAXHF:fix/update-ignore-error-message

Conversation

@JayanAXHF
Copy link
Copy Markdown
Member

@JayanAXHF JayanAXHF commented Apr 2, 2026

Add a better help message to ill_formed_attribute_input for the cases where it matches the usage of #![allow].

For further details see #154667

closes #154667

cc: @Zalathar

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 2, 2026

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 2, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 2, 2026

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 12 candidates

@jdonszelmann
Copy link
Copy Markdown
Contributor

r? me

@rustbot rustbot assigned jdonszelmann and unassigned petrochenkov Apr 2, 2026
@jdonszelmann
Copy link
Copy Markdown
Contributor

This change seems to have no tests. Did no tests change or do we not have a test for this new behavior yet?

@jdonszelmann
Copy link
Copy Markdown
Contributor

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 2, 2026
@JayanAXHF JayanAXHF force-pushed the fix/update-ignore-error-message branch from d60f71d to 94b8874 Compare April 2, 2026 18:10
@JayanAXHF
Copy link
Copy Markdown
Member Author

Oops forgot about that. @jdonszelmann I've added a test for this, lmk if there are any more changes to be made

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 2, 2026
Copy link
Copy Markdown
Contributor

@jdonszelmann jdonszelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 2, 2026

📌 Commit 94b8874 has been approved by jdonszelmann

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 2, 2026
rust-bors bot pushed a commit that referenced this pull request Apr 2, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #154444 (rustdoc ICE fix: When collecting `Deref` impls with their targets, skip the negative ones)
 - #154590 (Make #[cfg] suggest any or all on #[cfg(a, b)])
 - #154691 (core: Update the feature gate on `TryFrom<integer> for bool`)
 - #154697 (rustdoc: fix href of extern crates in search results)

Failed merges:

 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
rust-bors bot pushed a commit that referenced this pull request Apr 3, 2026
Rollup of 6 pull requests

Successful merges:

 - #154444 (rustdoc ICE fix: When collecting `Deref` impls with their targets, skip the negative ones)
 - #154590 (Make #[cfg] suggest any or all on #[cfg(a, b)])
 - #154691 (core: Update the feature gate on `TryFrom<integer> for bool`)
 - #154697 (rustdoc: fix href of extern crates in search results)
 - #154728 (rustdoc: Improve internal function name)
 - #154732 (fix(std): avoid AT_MINSIGSTKSZ on uclibc targets)

Failed merges:

 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 3, 2026
@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot rustbot added the has-merge-commits PR has merge commits, merge with caution. label Apr 3, 2026
@rust-log-analyzer

This comment has been minimized.

@JayanAXHF JayanAXHF force-pushed the fix/update-ignore-error-message branch from 3c1715d to 94b8874 Compare April 3, 2026 14:09
@rustbot

This comment has been minimized.

@rustbot rustbot removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. has-merge-commits PR has merge commits, merge with caution. labels Apr 3, 2026
…sage for the cases where it matches the usage of #![allow]
@JayanAXHF JayanAXHF force-pushed the fix/update-ignore-error-message branch from 94b8874 to 4c83a3d Compare April 3, 2026 14:12
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 3, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@JayanAXHF
Copy link
Copy Markdown
Member Author

@rustbot ready

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 3, 2026
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] rustc_windows_rc test:false 0.076
[RUSTC-TIMING] rustc_macros test:false 0.521
[RUSTC-TIMING] rustc_parse test:false 2.082
    Checking rustc_attr_parsing v0.0.0 (/checkout/compiler/rustc_attr_parsing)
error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:485:12
    |
485 |         cx.adcx().expected_list(attr_span, args);
    |            ^^^^
    |
help: there is a method `dcx` with a similar name
    |
485 -         cx.adcx().expected_list(attr_span, args);
485 +         cx.dcx().expected_list(attr_span, args);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:490:12
    |
490 |         cx.adcx().warn_empty_attribute(attr_span);
    |            ^^^^
    |
help: there is a method `dcx` with a similar name
    |
490 -         cx.adcx().warn_empty_attribute(attr_span);
490 +         cx.dcx().warn_empty_attribute(attr_span);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:495:16
    |
495 |             cx.adcx().expected_name_value(item.span(), Some(sym::enable));
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
495 -             cx.adcx().expected_name_value(item.span(), Some(sym::enable));
495 +             cx.dcx().expected_name_value(item.span(), Some(sym::enable));
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:501:16
    |
501 |             cx.adcx().expected_name_value(name_value.path().span(), Some(sym::enable));
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
501 -             cx.adcx().expected_name_value(name_value.path().span(), Some(sym::enable));
501 +             cx.dcx().expected_name_value(name_value.path().span(), Some(sym::enable));
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:505:16
    |
505 |             cx.adcx().expected_name_value(name_value.path().span(), Some(sym::enable));
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
505 -             cx.adcx().expected_name_value(name_value.path().span(), Some(sym::enable));
505 +             cx.dcx().expected_name_value(name_value.path().span(), Some(sym::enable));
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:511:16
    |
511 |             cx.adcx().expected_name_value(item.span(), Some(sym::enable));
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
511 -             cx.adcx().expected_name_value(item.span(), Some(sym::enable));
511 +             cx.dcx().expected_name_value(item.span(), Some(sym::enable));
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:515:16
    |
515 |             cx.adcx()
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
515 -             cx.adcx()
515 +             cx.dcx()
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:51:16
   |
51 |             cx.adcx().expected_name_value(attr_span, None);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
51 -             cx.adcx().expected_name_value(attr_span, None);
51 +             cx.dcx().expected_name_value(attr_span, None);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:56:16
   |
56 |             cx.adcx().expected_string_literal(n.value_span, Some(n.value_as_lit()));
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
56 -             cx.adcx().expected_string_literal(n.value_span, Some(n.value_as_lit()));
56 +             cx.dcx().expected_string_literal(n.value_span, Some(n.value_as_lit()));
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:324:16
    |
324 |             cx.adcx().expected_list(attr_span, args);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
324 -             cx.adcx().expected_list(attr_span, args);
324 +             cx.dcx().expected_list(attr_span, args);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:330:16
    |
330 |             cx.adcx().warn_empty_attribute(attr_span);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
330 -             cx.adcx().warn_empty_attribute(attr_span);
330 +             cx.dcx().warn_empty_attribute(attr_span);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:337:20
    |
337 |                 cx.adcx().expected_identifier(elem.span());
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
337 -                 cx.adcx().expected_identifier(elem.span());
337 +                 cx.dcx().expected_identifier(elem.span());
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:341:20
    |
341 |                 cx.adcx().expected_no_args(arg_span);
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
341 -                 cx.adcx().expected_no_args(arg_span);
341 +                 cx.dcx().expected_no_args(arg_span);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:347:20
    |
347 |                 cx.adcx().expected_identifier(path.span());
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
347 -                 cx.adcx().expected_identifier(path.span());
347 +                 cx.dcx().expected_identifier(path.span());
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:372:16
    |
372 |             cx.adcx().expected_list(attr_span, args);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
372 -             cx.adcx().expected_list(attr_span, args);
372 +             cx.dcx().expected_list(attr_span, args);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:378:16
    |
378 |             cx.adcx().warn_empty_attribute(attr_span);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
378 -             cx.adcx().warn_empty_attribute(attr_span);
378 +             cx.dcx().warn_empty_attribute(attr_span);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:385:20
    |
385 |                 cx.adcx().expected_identifier(elem.span());
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
385 -                 cx.adcx().expected_identifier(elem.span());
385 +                 cx.dcx().expected_identifier(elem.span());
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:389:20
    |
389 |                 cx.adcx().expected_no_args(arg_span);
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
389 -                 cx.adcx().expected_no_args(arg_span);
389 +                 cx.dcx().expected_no_args(arg_span);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:395:20
    |
395 |                 cx.adcx().expected_identifier(path.span());
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
395 -                 cx.adcx().expected_identifier(path.span());
395 +                 cx.dcx().expected_identifier(path.span());
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/debugger.rs:25:16
   |
25 |             cx.adcx().expected_list(attr_span, args);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
25 -             cx.adcx().expected_list(attr_span, args);
25 +             cx.dcx().expected_list(attr_span, args);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/debugger.rs:29:16
   |
29 |             cx.adcx().expected_single_argument(l.span);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
29 -             cx.adcx().expected_single_argument(l.span);
29 +             cx.dcx().expected_single_argument(l.span);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/debugger.rs:33:16
   |
33 |             cx.adcx().expected_name_value(single.span(), None);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
33 -             cx.adcx().expected_name_value(single.span(), None);
33 +             cx.dcx().expected_name_value(single.span(), None);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/debugger.rs:41:20
   |
41 |                 cx.adcx().expected_specific_argument(
   |                    ^^^^
   |
help: there is a method `dcx` with a similar name
   |
41 -                 cx.adcx().expected_specific_argument(
41 +                 cx.dcx().expected_specific_argument(
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/debugger.rs:50:16
   |
50 |             cx.adcx().expected_name_value(single.span(), path);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
50 -             cx.adcx().expected_name_value(single.span(), path);
50 +             cx.dcx().expected_name_value(single.span(), path);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/debugger.rs:55:16
   |
55 |             cx.adcx().expected_string_literal(path.value_span, Some(path.value_as_lit()));
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
55 -             cx.adcx().expected_string_literal(path.value_span, Some(path.value_as_lit()));
55 +             cx.dcx().expected_string_literal(path.value_span, Some(path.value_as_lit()));
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/link_attrs.rs:75:20
   |
75 |                 cx.adcx().warn_ill_formed_attribute_input(ILL_FORMED_ATTRIBUTE_INPUT);
   |                    ^^^^
   |
help: there is a method `dcx` with a similar name
   |
75 -                 cx.adcx().warn_ill_formed_attribute_input(ILL_FORMED_ATTRIBUTE_INPUT);
75 +                 cx.dcx().warn_ill_formed_attribute_input(ILL_FORMED_ATTRIBUTE_INPUT);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/link_attrs.rs:80:20
   |
80 |                 cx.adcx().expected_list(attr_span, args);
   |                    ^^^^
   |
help: there is a method `dcx` with a similar name
   |
80 -                 cx.adcx().expected_list(attr_span, args);
80 +                 cx.dcx().expected_list(attr_span, args);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/link_attrs.rs:96:20
   |
96 |                 cx.adcx().unexpected_literal(item.span());
   |                    ^^^^
   |
help: there is a method `dcx` with a similar name
   |
96 -                 cx.adcx().unexpected_literal(item.span());
96 +                 cx.dcx().unexpected_literal(item.span());
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/link_attrs.rs:112:24
    |
112 |                     cx.adcx().expected_specific_argument_strings(
    |                        ^^^^
    |
help: there is a method `dcx` with a similar name
    |
112 -                     cx.adcx().expected_specific_argument_strings(
112 +                     cx.dcx().expected_specific_argument_strings(
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/link_attrs.rs:198:28
    |
198 |                         cx.adcx().expected_specific_argument_strings(
    |                            ^^^^
    |
help: there is a method `dcx` with a similar name
    |
198 -                         cx.adcx().expected_specific_argument_strings(
198 +                         cx.dcx().expected_specific_argument_strings(
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/repr.rs:37:16
   |
37 |             cx.adcx().expected_list(attr_span, args);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
37 -             cx.adcx().expected_list(attr_span, args);
37 +             cx.dcx().expected_list(attr_span, args);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/repr.rs:43:16
   |
43 |             cx.adcx().warn_empty_attribute(attr_span);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
43 -             cx.adcx().warn_empty_attribute(attr_span);
43 +             cx.dcx().warn_empty_attribute(attr_span);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs:740:16
    |
740 |             cx.adcx().expected_list(attr_span, args);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
740 -             cx.adcx().expected_list(attr_span, args);
740 +             cx.dcx().expected_list(attr_span, args);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs:747:20
    |
747 |                 cx.adcx().unexpected_literal(item.span());
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
747 -                 cx.adcx().unexpected_literal(item.span());
747 +                 cx.dcx().unexpected_literal(item.span());
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs:751:20
    |
751 |                 cx.adcx().expected_identifier(arg.span());
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
751 -                 cx.adcx().expected_identifier(arg.span());
751 +                 cx.dcx().expected_identifier(arg.span());
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs:761:24
    |
761 |                     cx.adcx().expected_specific_argument(
    |                        ^^^^
    |
help: there is a method `dcx` with a similar name
    |
761 -                     cx.adcx().expected_specific_argument(
761 +                     cx.dcx().expected_specific_argument(
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs:799:16
    |
799 |             cx.adcx().expected_list(attr_span, args);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
799 -             cx.adcx().expected_list(attr_span, args);
799 +             cx.dcx().expected_list(attr_span, args);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs:814:36
    |
814 | ...                   cx.adcx().expected_name_value(
    |                          ^^^^
    |
help: there is a method `dcx` with a similar name
    |
814 -                                 cx.adcx().expected_name_value(
814 +                                 cx.dcx().expected_name_value(
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs:821:36
    |
821 | ...                   cx.adcx().expected_string_literal(nv.value_span, None);
    |                          ^^^^
    |
help: there is a method `dcx` with a similar name
    |
821 -                                 cx.adcx().expected_string_literal(nv.value_span, None);
821 +                                 cx.dcx().expected_string_literal(nv.value_span, None);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs:828:36
    |
828 | ...                   cx.adcx().expected_filename_literal(nv.value_span);
    |                          ^^^^
    |
help: there is a method `dcx` with a similar name
    |
828 -                                 cx.adcx().expected_filename_literal(nv.value_span);
828 +                                 cx.dcx().expected_filename_literal(nv.value_span);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs:834:36
    |
834 | ...                   cx.adcx().expected_name_value(
    |                          ^^^^
    |
help: there is a method `dcx` with a similar name
    |
834 -                                 cx.adcx().expected_name_value(
834 +                                 cx.dcx().expected_name_value(
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs:841:36
    |
841 | ...                   cx.adcx().expected_identifier(nv.value_span);
---
221 -                     .adcx()
221 +                     .dcx()
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/cfi_encoding.rs:17:16
   |
17 |             cx.adcx().expected_name_value(attr_span, Some(sym::cfi_encoding));
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
17 -             cx.adcx().expected_name_value(attr_span, Some(sym::cfi_encoding));
17 +             cx.dcx().expected_name_value(attr_span, Some(sym::cfi_encoding));
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/cfi_encoding.rs:22:16
   |
22 |             cx.adcx().expected_string_literal(name_value.value_span, None);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
22 -             cx.adcx().expected_string_literal(name_value.value_span, None);
22 +             cx.dcx().expected_string_literal(name_value.value_span, None);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/cfi_encoding.rs:27:16
   |
27 |             cx.adcx().expected_non_empty_string_literal(name_value.value_span);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
27 -             cx.adcx().expected_non_empty_string_literal(name_value.value_span);
27 +             cx.dcx().expected_non_empty_string_literal(name_value.value_span);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:28:16
   |
28 |             cx.adcx().expected_list(attr_span, args);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
28 -             cx.adcx().expected_list(attr_span, args);
28 +             cx.dcx().expected_list(attr_span, args);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:33:16
   |
33 |             cx.adcx().expected_single_argument(list.span);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
33 -             cx.adcx().expected_single_argument(list.span);
33 +             cx.dcx().expected_single_argument(list.span);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:42:20
   |
42 |                 cx.adcx()
   |                    ^^^^
   |
help: there is a method `dcx` with a similar name
   |
42 -                 cx.adcx()
42 +                 cx.dcx()
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:89:16
   |
89 |             cx.adcx().expected_specific_argument_and_list(attr_span, &[sym::on, sym::off]);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
89 -             cx.adcx().expected_specific_argument_and_list(attr_span, &[sym::on, sym::off]);
89 +             cx.dcx().expected_specific_argument_and_list(attr_span, &[sym::on, sym::off]);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:94:16
   |
94 |             cx.adcx().expected_single_argument(args.span);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
94 -             cx.adcx().expected_single_argument(args.span);
94 +             cx.dcx().expected_single_argument(args.span);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:99:23
   |
99 |             |span| cx.adcx().expected_specific_argument(span, &[sym::on, sym::off]);
   |                       ^^^^
   |
help: there is a method `dcx` with a similar name
   |
99 -             |span| cx.adcx().expected_specific_argument(span, &[sym::on, sym::off]);
99 +             |span| cx.dcx().expected_specific_argument(span, &[sym::on, sym::off]);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:140:16
    |
140 |             cx.adcx().expected_name_value(attr_span, None);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
140 -             cx.adcx().expected_name_value(attr_span, None);
140 +             cx.dcx().expected_name_value(attr_span, None);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:144:16
    |
144 |             cx.adcx().expected_string_literal(nv.value_span, Some(nv.value_as_lit()));
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
144 -             cx.adcx().expected_string_literal(nv.value_span, Some(nv.value_as_lit()));
144 +             cx.dcx().expected_string_literal(nv.value_span, Some(nv.value_as_lit()));
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:169:16
    |
169 |             cx.adcx().expected_name_value(attr_span, None);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
169 -             cx.adcx().expected_name_value(attr_span, None);
169 +             cx.dcx().expected_name_value(attr_span, None);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:201:16
    |
201 |             cx.adcx().expected_name_value(attr_span, None);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
201 -             cx.adcx().expected_name_value(attr_span, None);
201 +             cx.dcx().expected_name_value(attr_span, None);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:230:20
    |
230 |                 cx.adcx().expected_no_args(span);
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
230 -                 cx.adcx().expected_no_args(span);
230 +                 cx.dcx().expected_no_args(span);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:392:28
    |
392 |                         cx.adcx().expected_single_argument(list.span);
    |                            ^^^^
    |
help: there is a method `dcx` with a similar name
    |
392 -                         cx.adcx().expected_single_argument(list.span);
392 +                         cx.dcx().expected_single_argument(list.span);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:422:32
    |
422 | ...                   cx.adcx().expected_specific_argument(
    |                          ^^^^
    |
help: there is a method `dcx` with a similar name
    |
422 -                             cx.adcx().expected_specific_argument(
422 +                             cx.dcx().expected_specific_argument(
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:611:16
    |
611 |             cx.adcx().expected_list(attr_span, args);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
611 -             cx.adcx().expected_list(attr_span, args);
611 +             cx.dcx().expected_list(attr_span, args);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:621:20
    |
621 |                 cx.adcx().expected_name_value(item.span(), None);
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
621 -                 cx.adcx().expected_name_value(item.span(), None);
621 +                 cx.dcx().expected_name_value(item.span(), None);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:627:20
    |
627 |                 cx.adcx().expected_name_value(item.span(), path);
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
627 -                 cx.adcx().expected_name_value(item.span(), path);
627 +                 cx.dcx().expected_name_value(item.span(), path);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:636:28
    |
636 |                         cx.adcx().expected_specific_argument_strings(
    |                            ^^^^
    |
help: there is a method `dcx` with a similar name
    |
636 -                         cx.adcx().expected_specific_argument_strings(
636 +                         cx.dcx().expected_specific_argument_strings(
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:643:28
    |
643 |                         cx.adcx()
    |                            ^^^^
    |
help: there is a method `dcx` with a similar name
    |
643 -                         cx.adcx()
643 +                         cx.dcx()
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:674:28
    |
674 |                         cx.adcx().expected_specific_argument_strings(
    |                            ^^^^
    |
help: there is a method `dcx` with a similar name
    |
674 -                         cx.adcx().expected_specific_argument_strings(
674 +                         cx.dcx().expected_specific_argument_strings(
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:681:24
    |
681 |                     cx.adcx().expected_specific_argument_strings(
    |                        ^^^^
    |
help: there is a method `dcx` with a similar name
    |
681 -                     cx.adcx().expected_specific_argument_strings(
681 +                     cx.dcx().expected_specific_argument_strings(
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:745:16
    |
745 |             cx.adcx().expected_list(attr_span, args);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
745 -             cx.adcx().expected_list(attr_span, args);
745 +             cx.dcx().expected_list(attr_span, args);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:753:16
    |
753 |             cx.adcx().expected_list(meta_item_list.span, args);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
753 -             cx.adcx().expected_list(meta_item_list.span, args);
753 +             cx.dcx().expected_list(meta_item_list.span, args);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:762:20
    |
762 |                 cx.adcx().expected_name_value(item.span(), None);
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
762 -                 cx.adcx().expected_name_value(item.span(), None);
762 +                 cx.dcx().expected_name_value(item.span(), None);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:768:20
    |
768 |                 cx.adcx().expected_name_value(item.span(), None);
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
768 -                 cx.adcx().expected_name_value(item.span(), None);
768 +                 cx.dcx().expected_name_value(item.span(), None);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:777:28
    |
777 |                         cx.adcx().duplicate_key(meta_item.path().span(), sym::prefix_nops);
    |                            ^^^^
    |
help: there is a method `dcx` with a similar name
    |
777 -                         cx.adcx().duplicate_key(meta_item.path().span(), sym::prefix_nops);
777 +                         cx.dcx().duplicate_key(meta_item.path().span(), sym::prefix_nops);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:786:28
    |
786 |                         cx.adcx().duplicate_key(meta_item.path().span(), sym::entry_nops);
    |                            ^^^^
    |
help: there is a method `dcx` with a similar name
    |
786 -                         cx.adcx().duplicate_key(meta_item.path().span(), sym::entry_nops);
786 +                         cx.dcx().duplicate_key(meta_item.path().span(), sym::entry_nops);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:793:24
    |
793 |                     cx.adcx().expected_specific_argument(
    |                        ^^^^
    |
help: there is a method `dcx` with a similar name
    |
793 -                     cx.adcx().expected_specific_argument(
793 +                     cx.dcx().expected_specific_argument(
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:803:20
    |
803 |                 cx.adcx().expected_integer_literal(name_value_lit.value_span);
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
803 -                 cx.adcx().expected_integer_literal(name_value_lit.value_span);
803 +                 cx.dcx().expected_integer_literal(name_value_lit.value_span);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs:809:20
    |
809 |                 cx.adcx().expected_integer_literal_in_range(
    |                    ^^^^
    |
help: there is a method `dcx` with a similar name
    |
809 -                 cx.adcx().expected_integer_literal_in_range(
809 +                 cx.dcx().expected_integer_literal_in_range(
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/confusables.rs:17:20
   |
17 |                 cx.adcx().expected_list(attr_span, args);
   |                    ^^^^
   |
help: there is a method `dcx` with a similar name
   |
17 -                 cx.adcx().expected_list(attr_span, args);
17 +                 cx.dcx().expected_list(attr_span, args);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/confusables.rs:29:24
   |
29 |                     cx.adcx().expected_string_literal(span, param.lit());
   |                        ^^^^
   |
help: there is a method `dcx` with a similar name
   |
29 -                     cx.adcx().expected_string_literal(span, param.lit());
29 +                     cx.dcx().expected_string_literal(span, param.lit());
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:20:16
   |
20 |             cx.adcx().expected_name_value(attr_span, None);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
20 -             cx.adcx().expected_name_value(attr_span, None);
20 +             cx.dcx().expected_name_value(attr_span, None);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:25:16
   |
25 |             cx.adcx().expected_string_literal(n.value_span, Some(n.value_as_lit()));
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
25 -             cx.adcx().expected_string_literal(n.value_span, Some(n.value_as_lit()));
25 +             cx.dcx().expected_string_literal(n.value_span, Some(n.value_as_lit()));
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
  --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:95:16
   |
95 |             cx.adcx().expected_name_value(attr_span, None);
   |                ^^^^
   |
help: there is a method `dcx` with a similar name
   |
95 -             cx.adcx().expected_name_value(attr_span, None);
95 +             cx.dcx().expected_name_value(attr_span, None);
   |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:118:16
    |
118 |             cx.adcx().expected_name_value(attr_span, None);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
118 -             cx.adcx().expected_name_value(attr_span, None);
118 +             cx.dcx().expected_name_value(attr_span, None);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:141:16
    |
141 |             cx.adcx().expected_name_value(attr_span, None);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
141 -             cx.adcx().expected_name_value(attr_span, None);
141 +             cx.dcx().expected_name_value(attr_span, None);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:164:16
    |
164 |             cx.adcx().expected_name_value(attr_span, None);
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
164 -             cx.adcx().expected_name_value(attr_span, None);
164 +             cx.dcx().expected_name_value(attr_span, None);
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:223:16
    |
223 |             cx.adcx().expected_name_value(
    |                ^^^^
    |
help: there is a method `dcx` with a similar name
    |
223 -             cx.adcx().expected_name_value(
223 +             cx.dcx().expected_name_value(
    |

error[E0599]: no method named `adcx` found for mutable reference `&mut context::AcceptContext<'_, '_, S>` in the current scope
   --> compiler/rustc_attr_parsing/src/attributes/crate_level.rs:234:20
    |
234 |                 cx.adcx().expected_specific_argument_strings(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#[ignore(lint_name)] errors should suggest using #[allow(lint_name)] instead

5 participants